package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 * 
 */
public class DataxFailed implements Serializable {
	private Long id;

	private String recvRawMsgid;

	private String messageid;

	private String sendRawMsgid;

	private String msgType;

	private String msgFormate;

	private String msgSender;

	private String msgReceiver;

	private String errorInfo;

	private Short errorLevel;

	private Short errorType;

	private Short errorStatus;

	private Date time;

	private static final long serialVersionUID = 1L;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getRecvRawMsgid() {
		return recvRawMsgid;
	}

	public void setRecvRawMsgid(String recvRawMsgid) {
		this.recvRawMsgid = recvRawMsgid == null ? null : recvRawMsgid.trim();
	}

	public String getMessageid() {
		return messageid;
	}

	public void setMessageid(String messageid) {
		this.messageid = messageid == null ? null : messageid
				.trim();
	}

	public String getSendRawMsgid() {
		return sendRawMsgid;
	}

	public void setSendRawMsgid(String sendRawMsgid) {
		this.sendRawMsgid = sendRawMsgid == null ? null : sendRawMsgid.trim();
	}

	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType == null ? null : msgType.trim();
	}

	public String getMsgFormate() {
		return msgFormate;
	}

	public void setMsgFormate(String msgFormate) {
		this.msgFormate = msgFormate == null ? null : msgFormate.trim();
	}

	public String getMsgSender() {
		return msgSender;
	}

	public void setMsgSender(String msgSender) {
		this.msgSender = msgSender == null ? null : msgSender.trim();
	}

	public String getMsgReceiver() {
		return msgReceiver;
	}

	public void setMsgReceiver(String msgReceiver) {
		this.msgReceiver = msgReceiver == null ? null : msgReceiver.trim();
	}

	public String getErrorInfo() {
		return errorInfo;
	}

	public void setErrorInfo(String errorInfo) {
		this.errorInfo = errorInfo == null ? null : errorInfo.trim();
	}

	public Short getErrorLevel() {
		return errorLevel;
	}

	public void setErrorLevel(Short errorLevel) {
		this.errorLevel = errorLevel;
	}

	public Short getErrorType() {
		return errorType;
	}

	public void setErrorType(Short errorType) {
		this.errorType = errorType;
	}

	public Short getErrorStatus() {
		return errorStatus;
	}

	public void setErrorStatus(Short errorStatus) {
		this.errorStatus = errorStatus;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		DataxFailed other = (DataxFailed) that;
		return (this.getId() == null ? other.getId() == null : this.getId()
				.equals(other.getId()))
				&& (this.getRecvRawMsgid() == null ? other.getRecvRawMsgid() == null
						: this.getRecvRawMsgid()
								.equals(other.getRecvRawMsgid()))
				&& (this.getMessageid() == null ? other.getMessageid() == null
						: this.getMessageid().equals(
								other.getMessageid()))
				&& (this.getSendRawMsgid() == null ? other.getSendRawMsgid() == null
						: this.getSendRawMsgid()
								.equals(other.getSendRawMsgid()))
				&& (this.getMsgType() == null ? other.getMsgType() == null
						: this.getMsgType().equals(other.getMsgType()))
				&& (this.getMsgFormate() == null ? other.getMsgFormate() == null
						: this.getMsgFormate().equals(other.getMsgFormate()))
				&& (this.getMsgSender() == null ? other.getMsgSender() == null
						: this.getMsgSender().equals(other.getMsgSender()))
				&& (this.getMsgReceiver() == null ? other.getMsgReceiver() == null
						: this.getMsgReceiver().equals(other.getMsgReceiver()))
				&& (this.getErrorInfo() == null ? other.getErrorInfo() == null
						: this.getErrorInfo().equals(other.getErrorInfo()))
				&& (this.getErrorLevel() == null ? other.getErrorLevel() == null
						: this.getErrorLevel().equals(other.getErrorLevel()))
				&& (this.getErrorType() == null ? other.getErrorType() == null
						: this.getErrorType().equals(other.getErrorType()))
				&& (this.getErrorStatus() == null ? other.getErrorStatus() == null
						: this.getErrorStatus().equals(other.getErrorStatus()))
				&& (this.getTime() == null ? other.getTime() == null : this
						.getTime().equals(other.getTime()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime
				* result
				+ ((getRecvRawMsgid() == null) ? 0 : getRecvRawMsgid()
						.hashCode());
		result = prime
				* result
				+ ((getMessageid() == null) ? 0 : getMessageid()
						.hashCode());
		result = prime
				* result
				+ ((getSendRawMsgid() == null) ? 0 : getSendRawMsgid()
						.hashCode());
		result = prime * result
				+ ((getMsgType() == null) ? 0 : getMsgType().hashCode());
		result = prime * result
				+ ((getMsgFormate() == null) ? 0 : getMsgFormate().hashCode());
		result = prime * result
				+ ((getMsgSender() == null) ? 0 : getMsgSender().hashCode());
		result = prime
				* result
				+ ((getMsgReceiver() == null) ? 0 : getMsgReceiver().hashCode());
		result = prime * result
				+ ((getErrorInfo() == null) ? 0 : getErrorInfo().hashCode());
		result = prime * result
				+ ((getErrorLevel() == null) ? 0 : getErrorLevel().hashCode());
		result = prime * result
				+ ((getErrorType() == null) ? 0 : getErrorType().hashCode());
		result = prime
				* result
				+ ((getErrorStatus() == null) ? 0 : getErrorStatus().hashCode());
		result = prime * result
				+ ((getTime() == null) ? 0 : getTime().hashCode());
		return result;
	}
    
    public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}